<template>
  <div>
    <div v-if="sysFile.bigType == 'image'"
         class="avue-crud__img">
      <el-tooltip class="item"
                  effect="dark"
                  content="图片预览"
                  placement="left">
        <el-image :src="sysFile.url"
                  :preview-src-list="[ sysFile.url ]">
        </el-image>
      </el-tooltip>
    </div>
    <el-player v-else-if="sysFile.bigType == 'video'"
               :sysFile="sysFile" />
    <div v-else
         class="avue-crud__img">
      <el-tooltip class="item"
                  effect="dark"
                  content="暂不支持预览"
                  placement="left">
        <i class="el-icon-question"
           style="font-size: 30px; cursor: pointer;" />
      </el-tooltip>
    </div>
  </div>
</template>
<script>
import elPlayer from '@/components/player'

export default {
  name: 'annex',
  components: {
    elPlayer
  },
  props: {
    sysFile: {
      type: Object,
      default: () => {
        return {
        }
      }
    }
  }
}
</script>